package ichubcontext

import (
	"gitee.com/ichub/goconfig/common/base/baseiface"
	"gitee.com/ichub/goconfig/common/basedi"
)

const singleNameIchubCommonContext = "IchubCommonContext"

// init
// register
// load
func init() {
	registerBeanIchubCommonContext()
}

// register IchubCommonContext
func registerBeanIchubCommonContext() {
	basedi.RegisterLoadBean(singleNameIchubCommonContext, LoadIchubCommonContext)
}

func FindBeanIchubCommonContext() *IchubCommonContext {
	return basedi.FindBean(singleNameIchubCommonContext).(*IchubCommonContext)
}

func LoadIchubCommonContext() baseiface.ISingleton {
	return newIchubCommonContext()
}
